package org.liujing.jsw.client.ui;

import com.google.gwt.user.client.ui.*;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.*;

public class LabelProtype extends PlainComponent{
	private String text;
	public LabelProtype(String text){
		setText(text);
	}
	
	public void setText(String text) {
		String oldValue = this.text;
        this.text = text;
        //firePropertyChange("text", oldValue, text);

        getElement().setInnerText(text);
        if (text == null || oldValue == null || !text.equals(oldValue)) {
            revalidate();
        }
    }
    
    public String getText(){
    	return text;
    }
}
